<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ page import="net.comm.common.ValueMaping" %>
<%@ taglib uri="/WEB-INF/myTaglib.tld" prefix="tag"%>
<%@ taglib uri="/WEB-INF/jstlfun.tld" prefix="myfn" %>
<%@ taglib uri="/WEB-INF/c.tld"  prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="x-ua-compatible" content="ie=7" />
	<TITLE>群组话题:一点贷</TITLE>
	
	<link rel="stylesheet" type="text/css" href="${cpath}/css/main.css" />
	<link rel="stylesheet" type="text/css" href="${cpath}/css/group.css" />
</head>
<body>

 	<!-- 页首 {{{ -->
	<%@ include file="/menu.jsp"%>
   
	<div id="mainBody">
	<!-- 左边菜单栏 {{{ -->

		<DIV id=group>

		<!-- 右侧宽栏 {{{ -->
		<DIV class=group_mid>

			<form action="${cpath}/gforum.do" name="theForm"  method="post" enctype="multipart/form-data" >
			<div class='subtop' >
				<c:if test="${theForm.qryGroupID != 99999999 && theForm.qryGroupID > 0}">
				<p><a href="${cpath}/qunzu_${theForm.qryGroupID}"><img src="${cpath}/${myfn:getGroupPic(theForm.qryGroupID)}" ></a></p>
				</c:if>
				<c:if test="${theForm.qryGroupID == 99999999 || theForm.qryGroupID == 0}">
				<p><a href="${cpath}/qunzu_${theForm.qryVillageID}"><img src="${cpath}/images/fm.jpg" ></a></p>
				</c:if>
				
				<dl>
					<dt class="tit">
					<c:if test="${theForm.qryGroupID != 99999999 && theForm.qryGroupID > 0}">
					<a href="${cpath}/qunzu_${theForm.groupID}">${myfn:getGroupName(theForm.groupID)}</a>&nbsp;&gt;&nbsp;<a href="#">话题区</a>
					</c:if>
					<c:if test="${(theForm.qryGroupID == 99999999  || theForm.qryGroupID == 0)&& theForm.qryVillageID > 0}">
					<a href="${cpath}/qunzu_${theForm.groupID}">${myfn:getVillageName(theForm.qryVillageID)}</a>&nbsp;&gt;&nbsp;<a href="#">社区资料</a>
					</c:if>					
					</dt>
					<dd class="intro">&nbsp;</dd>
					<dd class="sel"><span>标&nbsp;&nbsp;&nbsp;&nbsp;题：</span><input type="text" name='qryTitle' value='${theForm.qryTitle}' maxlength="100" class="long"/></dd>
				</dl>
				<div class='fun'>
					<li><a href="javascript:history.go(-1);">返回上一页</a></li>
					<li><a href="javascript:doConfirm();">搜&nbsp;&nbsp;&nbsp;&nbsp;索</a></li>
				</div>
			</div>
			<div class='whole'><!-- 右侧宽栏 }}}-->
				<table class="info">
						<thead>
							<tr align=left>
								<th width="50%">标题</th>
								<th width="8%">浏览</th>
								<th width="7%">回复</th>
								<th width="10%">作者</th>
								<th width="15%">最后回复</th>								
							</tr>
						</thead>
						<tbody>
							<c:forEach var="forum" items="${forumlist}" varStatus="status">   
							<tr  <c:if test="${status.count%2!=0}"> bgcolor='#F2F3F6' </c:if> align=left>
								<td >
									<c:if test="${forum.up=='1'}"><span class="up">顶</span></c:if> 
									<c:if test="${forum.good=='1'}"><span class="good">精</span></c:if> 
									<a href="${cpath}/gfollforum_list/qryGForumID_${forum.GForumID}.html"><c:out value="${forum.title}"></c:out></a>
								</td>
								<td ><c:out value="${forum.attachcnt}"></c:out></td>
								<td ><c:out value="${forum.replycnt}"></c:out></td>
								<td class='dpic'><a href="${cpath}/users_home/userID_${forum.userID}.html"><img src="${cpath}/${myfn:getUserPic(forum.userID)}" width="20" height="20">&nbsp;${myfn:getUserNick(forum.userID)}</a></td>
								<td>${myfn:formatDate14(forum.mtime, "-")}</td>								
							</tr>
							</c:forEach> 
							<tr align="left">   
							 <td colspan="4">
								<input type="hidden" name='qryGroupID' value='${theForm.qryGroupID}'/>
								<!-- 分页主键 formName字段当前的form名称 -->
								<%@ include file="/jsplib/page.jsp" %>
								<!--隐藏域-->
								<input type="hidden" name='action' value='adlist'/>
								<input type="hidden" name='qryGroupID' value='${theForm.qryGroupID}'/>
							 </td>
							 <td>
							<c:if test="${myfn:groupAddFlag(theForm.qryGroupID,userID) ==  1}">
							 <a href="${cpath}/gforum.do?action=addPage&groupID=${theForm.qryGroupID}">发表话题</a>
							</c:if>
							<c:if test="${theForm.qryVillageID > 0}">
							 <a href="${cpath}/gforum.do?action=addPage&groupID=99999999&villageID=${theForm.qryVillageID}">发布资料</a>
							</c:if>

							 </td>
							</tr>  
						</tbody>
				</table>

			</div>			
			</form>

		</DIV><!-- profile_mid }}} -->
		</DIV><!-- group end }}} -->
	<DIV class="clear"></DIV>
	<%@ include file="/indexfoot.jsp"%>
	</DIV><!--cont end-->

</body>
</html>
<!---->

<script>

    /**
     * 检查项目资料维护
     */
	function doConfirm()
	{
		var form = document.theForm;

		var action = form['action'];

		form.submit();
	}

	/**
   * 根据具体请求设置各个组件状态	
   */
  function showState()
	{
		var action = '${theForm.action}';
		var form = document.theForm;		
		if(action == 'detail')
		{
           
			document.getElementById("back").style.display = "none";

		}
		else if(action == 'modifyPage' || action == 'update')
		{

			form['action'].value = 'update';
		}

	}
	showState();


</script>

